var ctPath = document.querySelector('input[name="xyz-contextPath"]').value,
// 国际化处理
locale = document.querySelector('input[name="xyz-locale"]').value;
locale = !locale || locale == 'null' ? 'zh_CN' : locale;

require.config({
	baseUrl: ctPath + '/javascript',
	waitSeconds: 100,
	paths: {
		'jquery': 'jquery/jquery-2.1.3.min',
		'XYZ': 'xyz/plugs/xyz.base',
		'domReady': 'requirejs/domReady',

		// jquery ui
		'jquery.ui': 'jquery-ui/js/jquery-ui',
		'timepicker-addon': 'timepicker-addon/jquery-ui-timepicker-addon',
		
		// jquery 插件
		'bootstrap': '../css/bootstrap/js/bootstrap',
		'select2': 'select2/js/select2',
		'select2.locale': 'select2/js/select2_locale_zh-CN',
		'jquery.jqGrid': 'jqGrid/js/jquery.jqGrid.src',
		'jquery.tablednd': 'jqGrid/plugins/jquery.tablednd',
		'jquery.jqGrid.locale': 'jqGrid/js/i18n/grid.locale-cn',
		'zTree': 'zTree/js/jquery.ztree.core-3.5',
		'zTree-excheck': 'zTree/js/jquery.ztree.excheck-3.5',
		'zTree-exedit': 'zTree/js/jquery.ztree.exedit-3.5',
		'jquery.form': 'form/jquery.form',
		'jquery.validate': 'jquery-validation/jquery.validate',
		'switch': 'switch/js/bootstrap-switch',
		'jquery.mockjax': 'mockjax/jquery.mockjax',
		'jquery.raty': 'raty/jquery.raty',
		'jquery.placeholder': 'placeholder/jquery.placeholder',
		
		// 独立插件
		'kindeditor': 'kindeditor/kindeditor',
		'kindeditor.locale': 'kindeditor/lang/zh_CN',
		'echarts': 'echarts/dist/echarts-all',
		'echarts.src': 'echarts/source/echarts-all',
		'template': 'artTemplate/template',
		'b64_md5': 'util/md5',
		
		// xyz插件
		'xyz.banner': 'xyz/plugs/xyz.banner',
		'xyz.tip': 'xyz/plugs/xyz.tip',
		'xyz.confirm': 'xyz/plugs/xyz.confirm',
		'xyz.scrollTop': 'xyz/plugs/xyz.scrollTop',
		'xyz.timepicker': 'xyz/plugs/xyz.timepicker',
		'xyz.validate': 'xyz/plugs/xyz.validate',
		'xyz.htmlESC': 'xyz/plugs/xyz.htmlESC',
		'xyz.storage': 'xyz/plugs/xyz.storage',
		'xyz.mock': 'xyz/mockajax/xyz.mock',
		
		// xyz业务模块插件
		'xyz.module.pluginname': 'xyz/not.exist',
		
		// 国际化文件
		'xyz.lang': 'xyz/i18n/xyz.lang',
		'xyz.lang.common': 'xyz/i18n/common/' + locale,
		'xyz.lang.module1': 'xyz/i18n/module1/' + locale
	},
	shim: {
		// jquery 插件
		'XYZ': {
			deps: ['jquery']
		},
		'bootstrap': {
			deps: ['jquery'],
			exports: 'jQuery.fn.popover'
		},
		'select2': {
			deps: ['jquery']
		},
		'select2.locale': {
			deps: ['select2']
		},
		'jquery.jqGrid': {
			deps: ['jquery', 'jquery.jqGrid.locale']
		},
		'jquery.jqGrid.locale': {
			deps: ['jquery']
		},
		'jquery.tablednd': {
			deps: ['jquery', 'jquery.jqGrid', 'jquery.jqGrid.locale']
		},
		// jquery.ui本身是不依赖bootstrap的,由于jquery.ui的button与bootstrap的冲突,为了使用jquery.ui的botton,只有在这里添加依赖,使bootstrap优先于jquery.ui加载
		'jquery.ui': {
			deps: ['bootstrap']
		},
		'jquery.mockjax': {
			deps: ['jquery']
		},
		'zTree': {
			deps: ['jquery']
		},
		'zTree-excheck': {
			deps: ['zTree']
		},
		'zTree-exedit': {
			deps: ['zTree']
		},		
		'timepicker-addon': {
			deps: ['jquery.ui']
		},
		'jquery.form': {
			deps: ['jquery']
		},
		'switch': {
			deps: ['jquery']
		},
		// 独立插件
		'kindeditor': {
			exports: 'kindEditor'
		},
		'kindeditor.locale': {
			exports: 'kindEditor',
			deps: ['kindeditor']
		},
		'b64_md5': {
			exports: 'b64_md5'
		}
	}
});